headerbar: simplify some size allocation code
authorRay Strode <rstrode@redhat.com>
Fri, 24 Jun 2016 11:57:06 +0000 (07:57 -0400)
committerRay Strode <rstrode@redhat.com>
Sat, 25 Jun 2016 00:20:22 +0000 (20:20 -0400)
commiteccfce50d6835206f7260937579bf363bdec1477
treeaacb65bd1fabfabaa4ec2c47d92ca03a53f3c560
parente0bebba4701395b8db6027bd8626e879a4cde90d
headerbar: simplify some size allocation code

With a headerbar, the widget in the center may be a label, constructed
internally, or a custom widget, constructed externally.  The size
allocation code needs to handle either case the same way for the most
part.  There's more than one place in the code that checks which of
the two widgets to use and does some operation on the selected one.

This commit simplifies the code by checking up front which one is the
center (title) widget and storing that in a temporary variable,
This allows reducing duplicated logic later on in the function.

https://bugzilla.gnome.org/show_bug.cgi?id=724332
gtk/gtkheaderbar.c